package com.sskj.lib.util;

import android.text.TextUtils;

public class HideUtil {
    // 手机号
    public static String getPhoneHide(String mobile) {
        if (TextUtils.isEmpty(mobile)) {
            return "";
        }
        return mobile.substring(0, 3) + "****" + mobile.substring(7, 11);
    }

    // 银行卡
    public static String getBankNumHide(String bankNum) {
        if (TextUtils.isEmpty(bankNum)) {
            return "";
        }
        return bankNum.substring(0, 4) + "**** **** ****" + bankNum.substring(bankNum.length() - 3, bankNum.length());
    }
}
